const Router = require("koa-router");
const { APP_PREFIX } = require("../config/config.default");
const { upload } = require("../controller/upload.controller");
const { auth, hadAdminPermission } = require("../middleware/auth.middleware");

const router = new Router({ prefix: `/${APP_PREFIX}/upload` });

// 上传文件
router.post("/img", auth, hadAdminPermission, upload);

module.exports = router;
